CC	=	g++
NAME	=	zia
SRCS	=	datatree/DataTree.cpp			\
		main.cpp				\
		CrossThread/MutexUnix.cpp		\
		CrossThread/ThreadUnix.cpp		\
		requests/Request.cpp			\
		parser/RequestParser.cpp		\
		tools/tools.cpp				\
		traitThread/traitThread.cpp		\
		XmlParser/XmlParser.cpp			\
		Network/ZiaServerUnix/ZiaServerUnix.cpp	\
		Network/Connection.cpp			\
		Network/IConnection.cpp			\
		tinyxml/tinyxml.cpp			\
		tinyxml/tinyxmlparser.cpp		\
		tinyxml/tinyxmlerror.cpp		\
		tinyxml/tinystr.cpp			\
		IMessage/IMessage.cpp			\
		IMessage/Message.cpp			\
		IStream/Stream.cpp			\
		IStream/AStream.cpp	
OBJS	=	$(SRCS:.cpp=.o)
CFLAGS	=	-W -Wall -Wextra
LB	=	-lm -lpthread -ldl -rdynamic -Werror

all : NAME

NAME : $(OBJS)
	$(CC) -o $(NAME) $(SRCS) $(CFLAGS) $(LB)

clean :
	rm -f $(OBJS)
	rm -f $(NAME)

fclean : clean
	rm -rf *~
	rm -rf *#

re : clean all

.PHONY: all NAME clean fclean re
